The present invention relates to portable storage media and, more particularly, to a portable storage device with an on-board file system.
Data storage media exist in computer systems in many forms: magnetic disks (“hard disks”), floppy disks, CD ROMs, flash cards, magnetic tapes and others. By far, the most common use of storage media is to store data files that are used by the computer system's applications and operating software.
The paradigm universally used for file storage is that a file system that is part of the computer system's operating software organizes data into files and directories and provides computer programs access to a storage device that includes a physical storage medium, and this file system communicates with the storage device and controls the storage device through a low-level interface. According to this paradigm, the storage device itself acts as a blank slate responding to simple commands to read or write from physical locations. The storage device itself has no awareness of the higher-level organization of files and directories.
Thus, for example, a magnetic disk may be connected to a computer system through an Advanced Technology Attachment (ATA) interface, also known as an Intelligent Drive Electronics (IDE) interface. This interface includes a protocol of commands enabling the computer system to instruct the disk controller to read a given number of data bytes from a given physical location on the disk, or to write a given number of data bytes to a given physical location on the disk. While such operations normally are part of a higher-level context of some operation on a file, this disk or its controller is neither aware of it nor needs to be.
Magnetic disks, floppy disks, flash cards and most other storage media conform to the “block device” model. In abstract terms, a block device is a linear array of memory, subdivided into fixed-sized blocks, addressable by number. A block device is able to read or write, upon request, a block given the block number.
To be able to act as a disk, a device needs to be able to conform to the block device model, that is, to designate portions of memory as blocks and to provide read and write access to such blocks. A file system is usually able to handle several types of physical storage media by using the fact that each of them is a block device. That is to say, file operations are ultimately processed into one or more block read/write operations on the device, a task that is left to the physical device and its controller to execute.
By contrast, a file system typically is organized in a hierarchical manner. A hierarchical file system is based on a root directory that may include files and subdirectories. Each subdirectory, in turn, may include files and further subdirectories. Typically, each file is stored as one or more blocks in a physical storage medium, but the associated data storage device is not aware that the blocks in which a file is stored are related to each other, and also is not aware of the relationship between that file and the other files stored in the storage medium.
The paradigm in which storage devices physically act as block devices and are made into file servers by the computer host software is rooted in considerations of compatibility and cost: It is easy to standardize the block device interface and so make storage devices compatible with many computer systems, and such standards exist as in the above mentioned ATA standard as well as subsets of the Small Computer System Interface (SCSI) standard. On the other hand different operating systems tend to have different file systems, making the standardization at this level difficult. From an economic point of view, logic on a storage device adds to the cost of the device, while operating software on the computer host is less expensive or free, a fact that has driven the interface of storage devices to be as simple and basic as possible.